package com.gree.times;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import com.gree.pool.alone.ReadFileAlone;
import com.gree.utils.Files;

public class WebContextListener implements ServletContextListener {

	/** 当后台被销毁，即发生了tomcat关闭了事件，固定用法 **/
	@Override
	public void contextDestroyed(ServletContextEvent event) {
	}

	/*** 当后台被初始化，即发生了tomcat启动了事件，固定用法 **/
	@Override
	public void contextInitialized(ServletContextEvent event) {
		Files.editorReduction();
		new Thread(new ReadFileAlone()).start();
	}

}
